Eliminate Makefile race
authorPo Lu <luangruo@yahoo.com>
Fri, 7 Jun 2024 13:39:01 +0000 (21:39 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 7 Jun 2024 13:39:01 +0000 (21:39 +0800)
* java/Makefile.in (cf-stamp): Don't separately depend on
NDK_BUILD_SHARED, as this renders make liable to descend into
cross/ndk-build twice in different processes.
(clean): Don't remove nonexistent file.

java/Makefile.in

index 35d2637837cb858dcd27c3fc3a5cd43476084415..802da0b9e36d22ee6458f1509a2788eacad6a2d3 100644 (file)
@@ -359,7 +359,11 @@ public static final String[] EMACS_SHARED_LIBRARIES\
 # all shared libraries are compiled, because the computation of
 # ALL_DEPENDENCIES in this instance of Make cannot be postponed until
 # that stage.
-cf-stamp: $(NDK_BUILD_SHARED) $(CROSS_LIBS)
+#
+# This recipe needs no dependency on $(NDK_BUILD_LIBS), since
+# $(CROSS_LIBS) is a phony target that itself guarantees that they are
+# up to date.
+cf-stamp: $(CROSS_LIBS)
        $(AM_V_EMACSCONFIG) $(MAKE) cf-stamp-1
        $(AM_V_at) touch $@
 $(CONFIG_FILE): cf-stamp; @true
@@ -433,4 +437,4 @@ clean:
        find . -name '*.class' $(FIND_DELETE)
 
 maintainer-clean distclean bootstrap-clean: clean
-       rm -f Makefile ndk-build.mk
+       rm -f Makefile